from django.db import models


class SshAudit(models.Model):
    user_name = models.CharField(max_length=20, verbose_name='操作用户')
    bash_shell = models.TextField(verbose_name='命令')
    audit_data_time = models.DateTimeField(verbose_name='操作时间')
    server_ip = models.GenericIPAddressField(protocol="IPv4", verbose_name='服务器ip')

    def __str__(self):
        return self.user_name

    class Meta:
        verbose_name = "审计"
        verbose_name_plural = verbose_name
